local ok, go = pcall(require, 'go')
if not ok then
  print('go-nvim load error')
  return
end

gofmt = require('go.format')

do_fmt = gofmt.gofmt
do_import = gofmt.goimport

vim.api.nvim_exec([[ autocmd BufWritePre *.go :silent! lua require('go.format').goimport() ]], false)
go.setup()
